package myTest;

import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.List;

public class GenericsTest {

    public static void main(String[] args) {
        try {
            Method get = GenericsTest.class.getMethod("get", List.class);
            System.out.println(get.getGenericParameterTypes()[0].getTypeName());
            Type[] types = get.getGenericParameterTypes();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }

    }


    public static String get(List<String> name) {

        return name.get(0);
    }

}
